class AuthD::Response
	IPC::JSON.message Error, 0 do
		property reason : String? = nil
		def initialize(@reason)
		end

		def to_s(io : IO)
			super io
			io << " (reason: #{@reason})"
		end
	end
	AuthD.responses << Error

	IPC::JSON.message ErrorMustBeAuthenticated, 20 do
		def initialize()
		end
	end
	AuthD.responses << ErrorMustBeAuthenticated

	IPC::JSON.message ErrorAlreadyUsedLogin, 21 do
		def initialize()
		end
	end
	AuthD.responses << ErrorAlreadyUsedLogin

	IPC::JSON.message ErrorMailRequired, 22 do
		def initialize()
		end
	end
	AuthD.responses << ErrorMailRequired

	IPC::JSON.message ErrorUserNotFound, 23 do
		def initialize()
		end
	end
	AuthD.responses << ErrorUserNotFound

	IPC::JSON.message ErrorPasswordTooShort, 24 do
		def initialize()
		end
	end
	AuthD.responses << ErrorPasswordTooShort

	IPC::JSON.message ErrorInvalidCredentials, 25 do
		def initialize()
		end
	end
	AuthD.responses << ErrorInvalidCredentials

	IPC::JSON.message ErrorRegistrationsClosed, 26 do
		def initialize()
		end
	end
	AuthD.responses << ErrorRegistrationsClosed

	IPC::JSON.message ErrorInvalidLoginFormat, 27 do
		def initialize()
		end
	end
	AuthD.responses << ErrorInvalidLoginFormat

	IPC::JSON.message ErrorInvalidEmailFormat, 28 do
		def initialize()
		end
	end
	AuthD.responses << ErrorInvalidEmailFormat

	IPC::JSON.message ErrorAlreadyUsersInDB, 29 do
		def initialize()
		end
	end
	AuthD.responses << ErrorAlreadyUsersInDB

	IPC::JSON.message ErrorReadOnlyProfileKeys, 30 do
		property read_only_keys : Array(String)
		def initialize(@read_only_keys)
		end

		def to_s(io : IO)
			super io
			io << " (read_only_keys: #{@read_only_keys.join(",")})"
		end
	end
	AuthD.responses << ErrorReadOnlyProfileKeys

	IPC::JSON.message ErrorInvalidActivationKey, 31 do
		def initialize()
		end
	end
	AuthD.responses << ErrorInvalidActivationKey

	IPC::JSON.message ErrorUserAlreadyValidated, 32 do
		def initialize()
		end
	end
	AuthD.responses << ErrorUserAlreadyValidated

	IPC::JSON.message ErrorCannotContactUser, 33 do
		def initialize()
		end
	end
	AuthD.responses << ErrorCannotContactUser

	IPC::JSON.message ErrorInvalidRenewKey, 34 do
		def initialize()
		end
	end
	AuthD.responses << ErrorInvalidRenewKey

	IPC::JSON.message ErrorPasswordTooLong, 35 do
		def initialize()
		end
	end
	AuthD.responses << ErrorPasswordTooLong

	IPC::JSON.message ErrorEmailAddressNotValidated, 36 do
		def initialize()
		end
	end
	AuthD.responses << ErrorEmailAddressNotValidated

	IPC::JSON.message ErrorEmailAddressAlreadyUsed, 37 do
		def initialize()
		end
	end
	AuthD.responses << ErrorEmailAddressAlreadyUsed
end
